import Image from 'next/image';

interface ImageCardProps {
  imageUrl: string;
  title: string;
  description?: string;
}

// 将 Card 重命名为 ImageCard
const ImageCard = ({ imageUrl, title, description }: ImageCardProps) => {
  return (
    <div className="bg-white rounded-lg shadow-md overflow-hidden">
      <Image
        src={imageUrl}
        alt="Card Image"
        width={300}
        height={200}
        className="w-full h-auto"
      />
      <div className="p-4">
        <h2 className="text-xl font-bold text-gray-800 mb-2">{title}</h2>
        {description && <p className="text-gray-700 text-base">{description}</p>}
      </div>
    </div>
  );
};

export default ImageCard;
